<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			var arr = [1,3,5,6,2,4]
			for(var i =0 ; i<arr.length-1;i++){
				for(var j = 0; j<arr.length -1-i;j++){
					if(arr[j]>arr[j+1]){
						[arr[j],arr[j+1]] = [arr[j+1],arr[j]]
					}
				}
			}
		</script>
	</body>
</html>
